import http from "@/api/config/http";
import { ITime } from "@/data/options/selection";
import { IQuery } from "@/interface/IAxios";

export function mediaQueue(query?: IQuery) {
  return http.request({
    url: `/media/queue/list`,
    method: "get",
    params: query
  });
}
export const mediaGroupQueue = (query: IQuery) => {
  return http.request({
    url: `/media/queue/groupsList`,
    method: "get",
    params: query
  });
};
export const exportQueue = (query: ITime) => {
  fileTemplate(`/media/queue/export`, {
    type: query.time,
    value: query.value
  });
};
export const reissueQueue = (query: ITime) => {
  return http.request({
    url: `/media/queue/reissue`,
    method: "get",
    params: {
      ...query
    }
  });
};
export const reissueQueueList = (idList: string[]) => {
  return http.request({
    url: `/media/queue/reissue/${idList.join(",")}`,
    method: "get"
  });
};
